package com.ymttest.database.mapping;

import com.ymttest.database.model.YmtAgentWxCodePic;
import com.ymttest.database.model.YmtAgentWxCodePicExample;
import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.type.JdbcType;

public interface YmtAgentWxCodePicMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_AgentWxCodePic
     *
     * @mbggenerated Mon Apr 27 10:51:00 CST 2020
     */
    @Insert({
        "insert into Ymt_AgentWxCodePic (Id, ProductId, ",
        "UserId, PicUrl, ",
        "Action, CreateTime, ",
        "UpdateTime, Content, ",
        "dataversion)",
        "values (#{id,jdbcType=INTEGER}, #{productId,jdbcType=VARCHAR}, ",
        "#{userId,jdbcType=INTEGER}, #{picUrl,jdbcType=VARCHAR}, ",
        "#{action,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP}, #{content,jdbcType=VARCHAR}, ",
        "#{dataversion,jdbcType=BINARY})"
    })
    int insert(YmtAgentWxCodePic record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_AgentWxCodePic
     *
     * @mbggenerated Mon Apr 27 10:51:00 CST 2020
     */
    @InsertProvider(type=YmtAgentWxCodePicSqlProvider.class, method="insertSelective")
    int insertSelective(YmtAgentWxCodePic record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_AgentWxCodePic
     *
     * @mbggenerated Mon Apr 27 10:51:00 CST 2020
     */
    @SelectProvider(type=YmtAgentWxCodePicSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="ProductId", property="productId", jdbcType=JdbcType.VARCHAR),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="PicUrl", property="picUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="Action", property="action", jdbcType=JdbcType.INTEGER),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="Content", property="content", jdbcType=JdbcType.VARCHAR),
        @Result(column="dataversion", property="dataversion", jdbcType=JdbcType.BINARY)
    })
    List<YmtAgentWxCodePic> selectByExampleWithBLOBs(YmtAgentWxCodePicExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_AgentWxCodePic
     *
     * @mbggenerated Mon Apr 27 10:51:00 CST 2020
     */
    @SelectProvider(type=YmtAgentWxCodePicSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="ProductId", property="productId", jdbcType=JdbcType.VARCHAR),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="PicUrl", property="picUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="Action", property="action", jdbcType=JdbcType.INTEGER),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="Content", property="content", jdbcType=JdbcType.VARCHAR)
    })
    List<YmtAgentWxCodePic> selectByExample(YmtAgentWxCodePicExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_AgentWxCodePic
     *
     * @mbggenerated Mon Apr 27 10:51:00 CST 2020
     */
    @Select({
        "select",
        "Id, ProductId, UserId, PicUrl, Action, CreateTime, UpdateTime, Content, dataversion",
        "from Ymt_AgentWxCodePic",
        "where Id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="ProductId", property="productId", jdbcType=JdbcType.VARCHAR),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="PicUrl", property="picUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="Action", property="action", jdbcType=JdbcType.INTEGER),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="Content", property="content", jdbcType=JdbcType.VARCHAR),
        @Result(column="dataversion", property="dataversion", jdbcType=JdbcType.BINARY)
    })
    YmtAgentWxCodePic selectByPrimaryKey(Integer id);
}